<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			* {
				margin: auto;
				padding: 0px;
				font-family: "楷书";
			}
			
			#main {
				width: 400px;
				height: 550px;
				background-image: url(img/beijing.jpg);
				position: relative;
			}
			
			#main .top {
				background-color: #23A7EF;
				height: 50px;
				font-size: 22px;
				line-height: 50px;
				text-align: center;
				font-weight: bolder;
				color: white;
			}
			
			.zh {
				position: absolute;
				top: 40%;
				left: 25%;
				color: white;
				font-weight: bolder;
			}
			
			.mm {
				position: absolute;
				top: 50%;
				left: 25%;
				color: white;
				font-weight: bolder;
			}
			
			
			
			#register {
				cursor: pointer;
				margin-top: 350px;
				height: 50px;
				line-height: 50px;
				text-align: center;
				color: white;
				font-weight: bolder;
			}
			
			.fanhui {
				cursor: pointer;
				height: 50px;
				line-height: 50px;
				text-align: center;
				color: white;
				font-weight: bolder;
			}
			
			#register:hover,
			.fanhui:hover {
				transition: 2s;
				color: #9E9FA1;
				background-color: #FE8400;
			}
		</style>
	</head>

	<body>
		<div id="main">
			<p class="top">注册</p>
			<p class="zh">账号 : <input type="text" id="username" /></p>
			<p class="mm">密码 : <input type="password" id="pwd" /></p>
			<p id="register">注册</p>
			<p class="fanhui" onclick="location.href = 'index.html'">返回登录</p>
		</div>
	</body>
	<script src="js/jmessage-sdk-web-2.1.0.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/jquery1.11.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/base.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$("#register").click(function() {
				register()
			})
			//注册
		function register() {
			JIM.register({
				'username': $("#username").val(),
				'password': $("#pwd").val(),
				'is_md5': false
			}).onSuccess(function(data) {
				alert("注册成功")
			}).onFail(function(data) {
				alert("注册失败")
			});
		}
	</script>

</html>